package com.powernode.feign;

/**
 * @version 1.0
 * @Date 2024/8/20 12:00
 * @Author 付~~~
 */

import com.powernode.domain.MemberAddr;
import com.powernode.feign.sentinel.OrderMemberFeignSentinel;
import com.powernode.model.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 订单业务模块调用会员业务模块feign接口（订单调会员）
 */
@FeignClient(value = "member-service",fallback = OrderMemberFeignSentinel.class)
public interface OrderMemberFeign {
    /**
     * 根据会员地址编号获取当前业务模块下的当前订单信息的地址信息,根据收货地址标识查询地址详情(远程调用,订单调用会员)
     * @param addrId
     * @return
     */
    @GetMapping("p/address/getMemberAddrById")
    public Result<MemberAddr> getMemberAddrById(@RequestParam Long addrId);

    /**
     * 根据会员标识查询会员默认收货地址
     */
    @GetMapping("p/address/getMemberDefaultAddrByOpenId")
    public Result<MemberAddr> getMemberDefaultAddrByOpenId(@RequestParam String openId);


    /**
     * 根据会员openID查询会员昵称(远程接口)
     * @param openId
     * @return
     */
    @GetMapping("admin/user/getNickNameByOpenId")
    public Result<String> getNickNameByOpenId(@RequestParam String openId);


}
